package com.hmdp.config;


import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Configuration;

/**
 * @className: com.hmdp.config-> RedisConfig
 * @description: redisson 配置类
 * @author: chenhs
 * @version: 1.0
 */
@Configuration
public class RedissonConfig {
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://47.108.13.36:6379").setPassword("123456");
        return Redisson.create(config);
    }
}
